// import { accessStore } from "@/store/sys";
import { Params, Location, NavigateFunction, To } from "react-router-dom";
import { aceessValid } from "./access";
export default function beforeRouter({
  location,
  params,
  navigate = () => {
    return undefined;
  },
}: {
  location: Location;
  params: Readonly<Params<string>>;
  navigate?: NavigateFunction;
}) {
  // 对权限进行了效验
  if (!aceessValid(location, navigate)) {
    return false;
  }
  return true;
}
